﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using System.Web.Core;

namespace Yuanlin.Business
{
    public class CompanyMash : AttachmentEntity
    {
        private Property<int> topCategory = new Property<int>();
        private Property<int> secondCategory = new Property<int>();
        private Property<int> categoryId = new Property<int>();//规格分类
        private Property<int> province = new Property<int>();
        private Property<int> city = new Property<int>();
        private Property<int> town = new Property<int>();
        private Property<int> smallTown = new Property<int>();
        private Property<int> userId = new Property<int>();
        private Property<string> title = new Property<string>();
        private Property<string> body = new Property<string>();
        private Property<string> tradeType = new Property<string>();
        private Property<string> categoryInfo = new Property<string>();
        private Property<string> companyName = new Property<string>();
        private Property<string> greenNum = new Property<string>();
        private Property<string> registerTrademark = new Property<string>();//注册商标
        private Property<string> guiGeNames = new Property<string>();//规格分类下的规格
        private Property<string> guiGeValues = new Property<string>();
        private Property<string> guiGeUnits = new Property<string>();
        private Property<string> secondCategoryText = new Property<string>();
        private Property<DateTime> createDate = new Property<DateTime>();
        private Property<DateTime> updateDate = new Property<DateTime>();
        private Property<double> price = new Property<double>();//价格

        public Property<int> TopCategory
        {
            get { return topCategory; }
            set { topCategory = value; }
        }
        public Property<int> SecondCategory
        {
            get { return secondCategory; }
            set { secondCategory = value; }
        }
        public Property<int> CategoryId
        {
            get { return categoryId; }
            set { categoryId = value; }
        }
        public Property<int> Province
        {
            get
            {
                return province;
            }
            set
            {
                province = value;
            }
        }
        public Property<int> City
        {
            get
            {
                return city;
            }
            set
            {
                city = value;
            }
        }
        public Property<int> Town
        {
            get
            {
                return town;
            }
            set
            {
                town = value;
            }
        }
        public Property<int> SmallTown
        {
            get
            {
                return smallTown;
            }
            set
            {
                smallTown = value;
            }
        }
        public Property<int> UserId
        {
            get { return userId; }
            set { userId = value; }
        }
        public Property<string> Title
        {
           get { return title; }
           set { title = value; }
        }
        public Property<string> TradeType
        {
            get { return tradeType; }
            set { tradeType = value; }
        }
        public Property<string> GuiGeNames
        {
            get { return guiGeNames; }
            set { guiGeNames = value; }
        }
        public Property<string> GuiGeValues
        {
            get { return guiGeValues; }
            set { guiGeValues = value; }
        }
        public Property<string> GuiGeUnits
        {
            get { return guiGeUnits; }
            set { guiGeUnits = value; }
        }
        public Property<string> CompanyName
        {
            get
            {
                return companyName;
            }
            set
            {
                companyName = value;
            }
        }
        public Property<string> SecondCategoryText
        {
            get { return secondCategoryText; }
            set { secondCategoryText = value; }
        }
        public Property<string> CategoryInfo
        {
            get { return categoryInfo; }
            set { categoryInfo = value; }
        }
        public Property<string> RegisterTrademark
        {
            get { return registerTrademark; }
            set { registerTrademark = value; }
        }
        public Property<string> GreenNum
        {
            get { return greenNum; }
            set { greenNum = value; }
        }
        public Property<double> Price
        {
            get { return price; }
            set { price = value; }
        }
        public Property<string> Body
        {
           get { return body; }
           set { body = value; }
        }
        public Property<DateTime> CreateDate
        {
            get
            {
                return createDate;
            }
            set
            {
                createDate = value;
            }
        }
        public Property<DateTime> UpdateDate
        {
            get
            {
                return updateDate;
            }
            set
            {
                updateDate = value;
            }
        }

        public string TradeTypeTransform(string tradeType)
        {
            string str = string.Empty;
            switch (tradeType)
            { 
                case "0":
                    str = ResourceManager.GetString("Sell");
                    break;
                case "1":
                    str = ResourceManager.GetString("Buy");
                    break;
            }
            return str;
        }
    }
}